package com.itheima.mapper;

import com.itheima.pojo.Role;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

public interface RoleMapper extends Mapper<Role> {
    void insertRolePermission(@Param("id") Integer id, @Param("permissionIds") Integer[] permissionIds);

    void insertRoleMenu(@Param("id") Integer id, @Param("menuIds") Integer[] menuIds);

    Integer[] selectRolePermission(@Param("id") Integer id);

    Integer[] selectRoleMenu(@Param("id") Integer id);

    void deleteRolePermission(@Param("id")Integer id);

    void deleteRoleMenu(@Param("id")Integer id);

    Integer findCountFromUserRole(@Param("id") Integer id);
}
